Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] CSSVarsProvider cleans up html[style] when unmounting #29946

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 29, 2021

Follow-up to #29929 (comment)

I adjusted the test descriptions since it sounded like the body element would be affected. However, document.documentElement points to <html> not <body> (that would be docoument.body)

Browser run: https://app.circleci.com/pipelines/github/mui-org/material-ui/57238/workflows/f8e8f5bb-04d8-4db2-990e-f7c0d7a2b75a

@eps1lon eps1lon added bug 🐛 Something doesn't work package: system Specific to @mui/system labels Nov 29, 2021
@eps1lon eps1lon changed the title [system] CSSVarsProvider cleans up html[style] when unmounting [system] CSSVarsProvider cleans up html[style] when unmounting Nov 29, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Nov 29, 2021

Details of bundle changes

Generated by 🚫 dangerJS against 85de16e

@eps1lon eps1lon marked this pull request as ready for review November 29, 2021 10:50
@eps1lon eps1lon requested a review from hbjORbj November 29, 2021 10:50
Copy link
Member

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@@ -141,14 +141,19 @@ export default function createCssVarsProvider(options) {

React.useEffect(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside: Pretty sure this should be a layout effect considering it does affect layout. @hbjORbj

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Will make the change!

@eps1lon eps1lon merged commit 304f6bc into mui:master Nov 29, 2021
@eps1lon eps1lon deleted the fix/system/cleanup branch November 29, 2021 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants